package com.zb.serviceimpl;

import java.util.List;

import com.zb.dao.MrDao;
import com.zb.daoimpl.MrDaoImpl;
import com.zb.entity.Mr;
import com.zb.entity.Yh;
import com.zb.service.MrService;
import com.zb.util.PageUtil;

public class MrServiceImpl implements MrService{
	private MrDao mrDao=new MrDaoImpl();
	public PageUtil<Mr> getMrPage(Integer index, String carnum) {
		PageUtil<Mr> page = new PageUtil<Mr>();
		
		List<Mr> list = mrDao.getMrList(index, page.getSize(),
				carnum);
		int count = mrDao.getMrCount(carnum);

		page.setCount(count);
		page.setData(list);
		page.setIndex(index);
		return page;
		
	}

	public void addMr(Mr m) {
		// TODO Auto-generated method stub
		mrDao.addMr(m);
	}

	public void updateMr(Mr m) {
		// TODO Auto-generated method stub
		mrDao.updateMr(m);
	}

	public void delMr(int id) {
		// TODO Auto-generated method stub
		mrDao.delMr(id);
	}

	public Mr getMrById(int id) {
		// TODO Auto-generated method stub
		return mrDao.getMrById(id);
	}

}
